﻿using UnityEngine;
using System.IO;
using UnityEditor;

/// <summary>
/// 一键创建所必须的基础文件夹
/// </summary>
public class CreateBaseFolders
{
    [MenuItem("MT_ToolKit/创建基础文件夹")]
    private static void CreateFolders()
    {
        //文件路径
        string path = Application.dataPath + "/";

        //创建文件夹（存在文件则不创建，不存在则创建）
        Directory.CreateDirectory(path + "AssetsPackage");
        Directory.CreateDirectory(path + "Resources");
        Directory.CreateDirectory(path + "Scripts");
        Directory.CreateDirectory(path + "Scenes");
        Directory.CreateDirectory(path + "StreamingAssets");
        Directory.CreateDirectory(path + "StreamingAssets/Config");
        AssetDatabase.Refresh();
        Debug.Log("文件夹创建成功！");
    }
}
